//
//  SocketIOClientOption.h
//  Socket.IO-Client
//
//  Created by alanwang.dev on 16/8/8.
//  Copyright © 2016年 com.alanwang.dev. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SocketLogger.h"
#import <UIKit/UIKit.h>

typedef enum: NSInteger {
    ConnectParams,
    Cookies,
    DoubleEncodeUTF8,
    ExtraHeaders,
    ForceNew,
    ForcePolling,
    ForceWebsockets,
    HandleQueue,
    Log,
    Logger,
    Nsp,
    Path,
    Reconnects,
    ReconnectAttempts,
    ReconnectWait,
    Secure,
    SelfSigned,
    SessionDelegate,
    VoipEnabled,
} SocketIOClientOption_Enum;

@protocol ClientOption <NSObject> // TODO:

- (NSDictionary *)getSocketIOOptionValue;

@end

@interface SocketIOClientOption : NSObject  <ClientOption>

@property (nonatomic, assign) SocketIOClientOption_Enum SocketIOOption;

// TODO: 枚举改为协议类属性
@property (nonatomic, strong) NSDictionary *ConnectParams;
@property (nonatomic, strong) NSMutableArray<NSHTTPCookie *> *Cookies;
@property (nonatomic, assign) BOOL DoubleEncodeUTF8;
@property (nonatomic, strong) NSDictionary *ExtraHeaders;
@property (nonatomic, assign) BOOL ForceNew;
@property (nonatomic, assign) BOOL ForcePolling;
@property (nonatomic, assign) BOOL ForceWebsockets;
@property (nonatomic, assign) dispatch_queue_t HandleQueue;
@property (nonatomic, assign) BOOL Log;
@property (nonatomic, strong) SocketLogger *Logger;
@property (nonatomic, copy) NSString *Nsp;
@property (nonatomic, copy) NSString *Path;
@property (nonatomic, assign) BOOL Reconnects;
@property (nonatomic, assign) NSInteger ReconnectAttempts;
@property (nonatomic, assign) NSInteger ReconnectWait;
@property (nonatomic, assign) BOOL Secure;
@property (nonatomic, assign) BOOL SelfSigned;
@property (nonatomic, strong) id<NSURLSessionDelegate> SessionDelegate;
@property (nonatomic, assign) BOOL VoipEnabled;

// 重写了description方法
- (NSString *)description;
// 重写了hashValue的get方法
@property (nonatomic, assign, readonly) NSInteger hashValue;

@end
